package com.example.back.impl;

import com.example.back.mapper.PsGameMapper;
import com.example.back.model.PsGame;
import com.example.back.service.PsGameService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class PsGameServiceImpl implements PsGameService {

    @Autowired
    private PsGameMapper psGameMapper;

    @Override
    public List<PsGame> findAllPsGame() {
        return psGameMapper.findAllPsGame();
    }

    @Override
    public List<PsGame> findAllPsGameByScore() {
        return psGameMapper.findAllPsGameByScore();
    }

    @Override
    public List<PsGame> findByInformation(String information) {
        return psGameMapper.findByInformation(information);
    }

    @Override
    public List<PsGame> searchPType(String type){return psGameMapper.searchPType(type);}

    @Override
    public List<PsGame> selectPName(String name) {return psGameMapper.selectPName(name);}

    @Override
    public Boolean insertPsGame(String name, String introduction, String yuyan, String type, double score) {
        return psGameMapper.insertPsGame(name, introduction, yuyan, type, score);
    }

    @Override
    public Boolean updateYuyanByID(int id, String yuyan) {
        return psGameMapper.updateYuyanByID(id, yuyan);
    }

    @Override
    public Boolean updateScoreByID(int id, double score){
        return psGameMapper.updateScoreByID(id, score);
    }

    @Override
    public Boolean deletePsGame(int id) {
        return psGameMapper.deletePsGame(id);
    }

    @Override
    public String findPhotoByID(int id){ return  psGameMapper.findPhotoByID(id);}
}
